mui.init();
var userinfo = app.getState();
var uid = userinfo.user_id;
document.getElementById('username').innerHTML = userinfo.name;
document.getElementById('user_id').innerHTML = uid;
var avatar = userinfo.avatar;
if(avatar && avatar.indexOf('upload') !== -1) {
	avatar = serverurl + 'upload/avatar/' + userinfo.user_id + '.jpg';
} else {
	avatar = 'static/images/1.png';
}
//userinfo.avatar = userinfo.avatar ? userinfo.avatar : '../../static/images/1.png';
document.getElementById('userhead').src = avatar;
var qrcode = new QRCode('qr', {
	text: 'user@' + uid,
	width: 300,
	height: 300,
	colorDark: '#000000',
	colorLight: '#ffffff',
	correctLevel: QRCode.CorrectLevel.H
});